package com.mall.api.service;

import com.mall.common.util.JsonResult;
import com.mall.model.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "mall-gateway",contextId = "category-order-feign")
public interface ProductFeignClientService {

    @GetMapping("/api/products/{categoryid}")
    JsonResult<List<Product>> getProductByCategoryId(@PathVariable("categoryid") Long categoryid, @RequestParam("status") Integer status);


}
